package com.springboot.jdbctemplate.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.springboot.jdbctemplate.dao.IMenuDAO;
import com.springboot.jdbctemplate.entity.Menu;
import com.springboot.jdbctemplate.service.IMenuService;

@Service
public class MenuServiceImpl implements IMenuService {
	private IMenuDAO menuDAO;
	
	@Autowired
	public void setMenuDAO(IMenuDAO menuDAO) {
		this.menuDAO = menuDAO;
	}

	@Override
	public int add(Menu menu) {
		// TODO Auto-generated method stub
		return menuDAO.add(menu);
	}

	@Override
	public int update(Menu menu) {
		// TODO Auto-generated method stub
		return menuDAO.update(menu);
	}

	@Override
	public int delete(int id) {
		// TODO Auto-generated method stub
		return menuDAO.delete(id);
	}

	@Override
	public Menu findAccountById(String id) {
		// TODO Auto-generated method stub
		return menuDAO.findAccountById(id);
	}

	@Override
	public List<Menu> findAccountList() {
		// TODO Auto-generated method stub
		return menuDAO.findAccountList();
	}

}
